home *** CD-ROM | disk | FTP | other *** search
/ Aminet 35 / Aminet 35 (2000)(Schatztruhe)[!][Feb 2000].iso / Aminet / dev / gui / gui4cli.lha / Gui4Cli / Tools / Rtn / FilePop < prev    next >
Encoding:
Text File  |  1999-11-24  |  2.7 KB  |  141 lines

  1. G4C
  2.  
  3. ; Opens pop-up window to deal with a file
  4.  
  5. ; USE:
  6. ; GuiLoad guis:tools/rtn/FilePop FileName    -or
  7. ; GuiOpen FilePop FileName
  8.  
  9. ; ================================================================
  10.  
  11. ;             Globals & system events
  12.  
  13. ; ================================================================
  14.  
  15. WinBig 0 0 80 90 ""
  16. WinType 00001000
  17. ResInfo 8 640 256
  18. winonmouse 30 7 
  19.  
  20. xonload filename
  21. if $filename > ''
  22.    guiopen FilePop $filename
  23. endif
  24.  
  25. xonreload filename
  26. if $filename > ''
  27.    guiopen FilePop $filename
  28. endif
  29.  
  30. xonopen filename  ; just to get the var
  31.  
  32. xOnRMB 
  33. guiclose FilePop
  34.  
  35. xOnInactive
  36. guiclose FilePop
  37.  
  38. xOnFail
  39. ezreq "Error during operation" OK ""
  40.  
  41. xOnQuit
  42. guiquit FilePop2
  43.  
  44. ; ================================================================
  45.  
  46. ;             Buttons
  47.  
  48. ; ================================================================
  49.  
  50. xbutton 0 0 0 15 Auto
  51. guiclose FilePop
  52. guiload guis:tools/rtn/GetFileType $filepop/filename
  53. filetype = $$ret.0
  54. if $filetype > ''
  55.    guiload guis:tools/rtn/ViewFile $FilePop/filename $FilePop/filetype RUN
  56. endif
  57.  
  58. xbutton 0 15 0 15 More..
  59. guiopen  FilePop2
  60. guiclose FilePop
  61.  
  62. xbutton 0 30 0 15 List
  63. guiload guis:tools/read.gc $FilePop/filename
  64.  
  65. xbutton 0 45 0 15 Cli..
  66. guiclose FilePop
  67. guiload guis:tools/cli.gc $filepop/filename CLI
  68.  
  69. xbutton 0 60 0 15 'Edit'
  70. ifexists port rexx_ced        ; if the CygnusEd editor is running..
  71.    ifexists gui cedbar.gc    ; use it for the editing
  72.        guiscreen cedbar.gc front
  73.    else
  74.        guiscreen FilePop back    ; hoping that Ced is the next screen..
  75.    endif
  76.    sendrexx rexx_ced 'open new'
  77.    sendrexx rexx_ced 'open $filename'
  78.    sendrexx rexx_ced 'expand view'
  79. elseifexists variable *DEF.EDITOR
  80.    run '$*DEF.EDITOR $filename'
  81. else
  82.    run 'c:ed $filename'
  83. endif
  84. guiclose FilePop
  85.  
  86. xbutton 0 75 0 15 Rx
  87. guiclose FilePop
  88. sendrexx AREXX '$filename'
  89.  
  90.  
  91. ;######################################################################
  92.  
  93.     NEWFILE FilePop2    ; Pop-up on double-click "More.." gui.
  94.                 ; edit this gui to fit your favourites
  95.  
  96. ;######################################################################
  97.  
  98. WinBig 0 0 80 90 ""
  99. WinType 00001000
  100. ResInfo 8 640 256
  101. winonmouse 30 7 
  102. varpath 'FilePop'
  103.  
  104. xOnRMB 
  105. guiclose FilePop2
  106.  
  107. xOnInactive
  108. guiclose FilePop2
  109.  
  110. xOnFail
  111. ezreq "Error during operation" OK ""
  112.  
  113. ;---------------> the Buttons
  114.  
  115. xbutton 0 0 0 15 'MView'
  116. guiclose FilePop2
  117. if $*DEF.DT > ''
  118.    run '$*DEF.DT $filename'
  119. else
  120.    run 'multiview $filename'
  121. endif
  122.  
  123. xbutton 0 15 0 15 'FRead'
  124. guiclose FilePop2
  125. *FRGUIDE = $filename
  126. guiload guis:tools/fastread/fastread.gc
  127.  
  128. xbutton 0 30 0 15 'DPaint'
  129. guiclose FilePop2
  130. run '$*DEF.PAINT $filename'
  131.  
  132. xbutton 0 45 0 15 'GfxEd'
  133. run '$*DEF.GFXED $filename'
  134.  
  135. xbutton 0 60 0 15 'HexView'
  136. run '$*DEF.HEX $filename'
  137.  
  138. xbutton 0 75 0 15 'Mod'
  139. run '$*DEF.MOD $filename'
  140.  
  141.